#ifndef HASH_TABLE_H
#define HASH_TABLE_H
#define CAPACITY_INIT 10

typedef struct userInfo_s{
    int user_id;
    char *user_name;
    char *salt;
    char *encrypt_password;
    char *prefix;
    char *virtual_path;
}userInfo;

typedef char* KEYTYPE;
typedef userInfo VALTYPE;

typedef struct hashNode_s{
    KEYTYPE user_name;
    VALTYPE user_info;    
    struct hashNode_s* next;
}hashNode;

typedef struct hashTable_s{
    hashNode** buckets;
    int size;
    int capacity;
    uint32_t seed;
}userTable;

userTable *user_table_create();
int user_table_init(userTable* h);
int user_table_put(userTable* h, KEYTYPE key, VALTYPE val);
int user_table_del(userTable* h, KEYTYPE key);
int user_table_find(userTable* h, KEYTYPE key, VALTYPE* val);


#endif
